<template>
  <div class="errorpage">
    <div class="errorcontainer">
      <div class="erricon">
        <i class="fa fa-times-circle"></i>
      </div>
      <div class="errdesc">{{errdesc}}</div>
    </div>
  </div>
</template>

<script type="text/ecmascript-6">
  export default {
    name: 'errorpage',
    data() {
      return {
        errdesc: '抱歉,遇到一个未知错误,请刷新后重试!'
      };
    },
    created() {
      if (this.$route.query.errdesc) {
        this.errdesc = this.$route.query.errdesc;
      }
      this.$store.commit('END_LOADING');
    }
  };
</script>

<style lang="stylus" rel="stylesheet/stylus">
  .errorpage
    display fixed
    position absolute
    width 100%
    height 100%
    background-color transparent
    .errorcontainer
      display flex
      flex-direction column
      justify-content center
      align-items center
      width 100%
      height 100%
      background-color transparent
      .erricon
        margin-bottom 8px
        font-size 36px
        color red
      .errdesc
        max-width 270px
</style>
